<?php
	//数据库连接函数
	function mysql_connect_default($dbname='',$host='',$user='',$password='')
	{
		global $Configuration;
		$dbname=($dbname==null||$dbname='') ? $Configuration['Server']['DbName']:$dbname;
		$host=($host==null||$host=='') ? $Configuration['Server']['Host']:$host;
		$user=($user==null||$user=='') ? $Configuration['Server']['User']:$user;
		$password=($password==null||$password=='') ? $Configuration['Server']['Password']:$password;
		
		$link=mysql_connect($host,$user,$password);
		mysql_query('SET NAMES '.$Configuration['Server']['Charset'].'');		
		mysql_select_db($dbname);
		return $link;
	}
	function PrintError($title,$err)
	{
		echo "<span style='font-size:20px;color:red;'>".$title."</span><hr/><span>".$err."</span>";
	}
	
	function PrintWarming($title,$err)
	{
		echo "<span style='font-size:20px;color:#ff9900;'>".$title."</span><hr/><span>".$err."</span>";
	}	
	
	function Alert($str)
	{
		echo $str;
		exit();
	}
	
	function println($str)
	{
		echo $str.'<br/>';
	}
?>